﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ApproveIndustry.aspx.cs"
    Inherits="MyVocationSpace.ApproveIndustry" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="Header.ascx" TagName="header" TagPrefix="uc" %>
<%@ Register Src="Footer.ascx" TagName="footer" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>..:: MY VocationSpace ::..</title>
    <link href="css/Default.css" rel="stylesheet" type="text/css" />
    <link href="css/MyStyle.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function checkAll(objRef) {
            var GridView = objRef.parentNode.parentNode.parentNode;
            var inputList = GridView.getElementsByTagName("input");
            for (var i = 0; i < inputList.length; i++) {
                //Get the Cell To find out ColumnIndex 
                var row = inputList[i].parentNode.parentNode;
                if (inputList[i].type == "checkbox" && objRef != inputList[i]) {
                    if (objRef.checked) {
                        //If the header checkbox is checked 
                        //check all checkboxes 
                        //and highlight all rows 
                        //  row.style.backgroundColor = "aqua";
                        inputList[i].checked = true;
                    }
                    else {
                        //If the header checkbox is checked 
                        //uncheck all checkboxes 
                        //and change rowcolor back to original  
                        if (row.rowIndex % 2 == 0) {
                            //Alternating Row Color 
                            //   row.style.backgroundColor = "#C2D69B";
                        }
                        else {
                            //   row.style.backgroundColor = "white";
                        }
                        inputList[i].checked = false;
                    }
                }
            }
        } 
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <center>
        <div>
            <uc:header ID="header" runat="server" />
        </div>
        <div style="height: 650px" id="content-wrapper">
            <center>
                <div class="Content">
                    <table width="700px" style="padding-top: 10px">
                        <tr>
                            <td align="center" valign="top">
                                <table border="0">
                                    <tr>
                                        <td align="center" valign="top">
                                            <table border="0" cellpadding="5" cellspacing="0" width="840px" style="background-color: #EDF2F5;
                                                border: 1px solid #58A5CC">
                                                <tr>
                                                    <td class="heading" runat="server">
                                                        Approve / Disapprove Industry
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="tdContent">
                                                        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="upApproveIndustry">
                                                            <ProgressTemplate>
                                                                <center>
                                                                    <img src="Images/loading123.gif" alt="loading" width="20" height="20" />
                                                                    <span style="color: #1C6F93; font-size: 13px;">Please wait... </span>
                                                                </center>
                                                            </ProgressTemplate>
                                                        </asp:UpdateProgress>
                                                        <asp:UpdatePanel ID="upApproveIndustry" runat="server">
                                                            <ContentTemplate>
                                                                <table>
                                                                    <tr>
                                                                        <td align="center">
                                                                            <asp:GridView ID="gdApproveIndustry" runat="server" CellPadding="4" Width="800px"
                                                                                ForeColor="#333333" GridLines="None" DataKeyNames="IDTempIndustry" AllowPaging="True"
                                                                                AutoGenerateColumns="False" EmptyDataText="Data Not Found...!!!" PageSize="15"
                                                                                OnPageIndexChanging="gdApproveIndustry_PageIndexChanging" OnRowDataBound="gdApproveIndustry_RowDataBound">
                                                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                                                                <Columns>
                                                                                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="ID">
                                                                                        <ItemTemplate>
                                                                                            <asp:LinkButton ID="lnkIDTempIndustry" runat="server" Text='<%#Bind("IDTempIndustry")%>'
                                                                                                CommandArgument='<%# Bind("IDTempIndustry") %>' OnClick="lnkIDTempIndustry_Click"></asp:LinkButton>
                                                                                        </ItemTemplate>
                                                                                    </asp:TemplateField>
                                                                                    <asp:BoundField DataField="Name" ItemStyle-HorizontalAlign="Center" HeaderText="Name">
                                                                                        <ItemStyle HorizontalAlign="Center" />
                                                                                    </asp:BoundField>
                                                                                    <asp:BoundField DataField="Email" ItemStyle-HorizontalAlign="Center" HeaderText="Email">
                                                                                        <ItemStyle HorizontalAlign="Center" />
                                                                                    </asp:BoundField>
                                                                                    <asp:BoundField DataField="IndusName" ItemStyle-HorizontalAlign="Center" HeaderText="IndustryName">
                                                                                        <ItemStyle HorizontalAlign="Center" />
                                                                                    </asp:BoundField>
                                                                                    <asp:BoundField DataField="Description" ItemStyle-HorizontalAlign="Center" HeaderText="Description">
                                                                                        <ItemStyle HorizontalAlign="Center" />
                                                                                    </asp:BoundField>
                                                                                    <asp:BoundField DataField="CreationDate" ItemStyle-HorizontalAlign="Center" HeaderText="RequestedDate">
                                                                                        <ItemStyle HorizontalAlign="Center" />
                                                                                    </asp:BoundField>
                                                                                    <asp:TemplateField HeaderText="Status" ItemStyle-HorizontalAlign="Center">
                                                                                        <ItemTemplate>
                                                                                            <asp:Label ID="lblApprove" runat="server" ForeColor="Blue" Text='<%#Eval("IsApprove")%>'></asp:Label></ItemTemplate>
                                                                                    </asp:TemplateField>
                                                                                    <%--<asp:TemplateField>
                                                                                        <ItemTemplate><%#(Boolean.Parse(Eval("IsApprove").ToString())) ? "Yes" : "No" %></ItemTemplate>
                                                                                    </asp:TemplateField>--%>
                                                                                    <%--<asp:BoundField DataField="IsApprove" DataFormatString="{0:Approve/Disapprove}" ItemStyle-HorizontalAlign="Center" HeaderText="Status">
                                                                                        <ItemStyle HorizontalAlign="Center" />
                                                                                    </asp:BoundField>--%>
                                                                                    <%-- <asp:TemplateField HeaderText="Select Industry to Approve">
                                                                                        <HeaderTemplate>
                                                                                            <asp:CheckBox runat="server" ID="HeaderLevelCheckbox" OnClick="checkAll(this);" /></HeaderTemplate>
                                                                                        <ItemTemplate>
                                                                                            <asp:CheckBox ID="chkApprove" runat="server" /></ItemTemplate>
                                                                                    </asp:TemplateField>--%>
                                                                                </Columns>
                                                                                <EditRowStyle BackColor="#999999" />
                                                                                <EmptyDataRowStyle ForeColor="Red" Font-Size="Large" />
                                                                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                                                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                                                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                                                                <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                                                                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                                                                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                                                                            </asp:GridView>
                                                                            <br />
                                                                            <table border="0" width="700px">
                                                                                <tr>
                                                                                    <td align="right">
                                                                                        <asp:Button ID="btnapprv" runat="server" Visible="false" Text="Approve" CssClass="formBtnEdit"
                                                                                            OnClick="btnapprv_Click" />
                                                                                    </td>
                                                                                </tr>
                                                                            </table>
                                                                            <asp:LinkButton ID="lnkIDTempIndustry" runat="server" Style="display: none"></asp:LinkButton>
                                                                            <asp:ModalPopupExtender ID="AI_ModalPopupExtender" runat="server" Enabled="True"
                                                                                CancelControlID="cancelBtn" TargetControlID="lnkIDTempIndustry" PopupControlID="ApproveIndustryPanel"
                                                                                BackgroundCssClass="modalBackground">
                                                                            </asp:ModalPopupExtender>
                                                                            <asp:Panel ID="ApproveIndustryPanel" runat="server">
                                                                                <table width="600px" class="ModalPopup">
                                                                                    <tr>
                                                                                        <td colspan="2">
                                                                                            <div style="float: right">
                                                                                                <img src="~/Images/blue-close-button.png" alt="close" style="width: 15px; height: 15px;"
                                                                                                    runat="server" id="cancelBtn" /></div>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td align="left" colspan="2" class="modalhead">
                                                                                            Approve / Disapprove Industry
                                                                                            <hr style="width: 550px; text-align: left; border: 1px solid #1C6F93;" />
                                                                                            <asp:Label ID="lblIDTempIndustry" runat="server" Visible="false"></asp:Label>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td colspan="2">
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td align="left" class="modalChild">
                                                                                            First Name:
                                                                                        </td>
                                                                                        <td align="left">
                                                                                            <asp:Label ID="lblFName" runat="server"></asp:Label>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td align="left" class="modalChild">
                                                                                            Last Name:
                                                                                        </td>
                                                                                        <td align="left">
                                                                                            <asp:Label ID="lblLName" runat="server"></asp:Label>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td align="left" class="modalChild">
                                                                                            Email:
                                                                                        </td>
                                                                                        <td align="left">
                                                                                            <asp:Label ID="lblEmail" runat="server"></asp:Label>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td align="left" class="modalChild">
                                                                                            Industry Name:
                                                                                        </td>
                                                                                        <td align="left">
                                                                                            <asp:Label ID="lblIndustryName" runat="server"></asp:Label>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td align="left" valign="top" class="modalChild">
                                                                                            Description:
                                                                                        </td>
                                                                                        <td align="left">
                                                                                            <asp:Label ID="lblDescription" runat="server"></asp:Label>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td colspan="2">
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td align="left" style="padding-top: 20px;" colspan="2">
                                                                                            <hr style="width: 550px; text-align: left; border: 1px solid #D6D6D6;" />
                                                                                            <table style="padding-top: 10px; width: 400px">
                                                                                                <tr>
                                                                                                    <td valign="top" class="lblName">
                                                                                                        Status:
                                                                                                    </td>
                                                                                                    <td valign="top">
                                                                                                        <div>
                                                                                                            <asp:RadioButtonList ID="rdIndustry" RepeatDirection="Horizontal" runat="server">
                                                                                                                <asp:ListItem Value="1">Approve</asp:ListItem>
                                                                                                                <asp:ListItem Value="0">Disapprove</asp:ListItem>
                                                                                                            </asp:RadioButtonList>
                                                                                                        </div>
                                                                                                        <div>
                                                                                                            <asp:RequiredFieldValidator ID="rfvrdIndustry" ValidationGroup="update" runat="server"
                                                                                                                Display="Dynamic" ControlToValidate="rdIndustry" ForeColor="Red" ErrorMessage="Select status"></asp:RequiredFieldValidator></div>
                                                                                                    </td>
                                                                                                </tr>
                                                                                                <tr>
                                                                                                    <td valign="top" class="lblName">
                                                                                                        Description:
                                                                                                    </td>
                                                                                                    <td>
                                                                                                        <div>
                                                                                                            <asp:TextBox ID="txtAppoveDisApp" Rows="6" Columns="30" TextMode="MultiLine" runat="server"></asp:TextBox>
                                                                                                        </div>
                                                                                                        <div>
                                                                                                            <asp:RequiredFieldValidator ID="rfvtxtAppoveDisApp" ValidationGroup="update" Display="Dynamic"
                                                                                                                runat="server" ControlToValidate="txtAppoveDisApp" ForeColor="Red" ErrorMessage="Enter description"></asp:RequiredFieldValidator>
                                                                                                            <span id="idspanApprove" runat="server" style="color: Green; display: none; font-weight: bold;
                                                                                                                font-size: 13px; font-family: Arial"></span>
                                                                                                        </div>
                                                                                                    </td>
                                                                                                </tr>
                                                                                                <tr>
                                                                                                    <td colspan="2">
                                                                                                    </td>
                                                                                                </tr>
                                                                                                <tr>
                                                                                                    <td colspan="2" align="center">
                                                                                                        <asp:Button ID="btnAppoveIndustry" ValidationGroup="update" CssClass="formBtnEdit"
                                                                                                            runat="server" Text="Submit" OnClick="btnAppoveIndustry_Click" />
                                                                                                    </td>
                                                                                                </tr>
                                                                                            </table>
                                                                                        </td>
                                                                                    </tr>
                                                                                </table>
                                                                            </asp:Panel>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </ContentTemplate>
                                                        </asp:UpdatePanel>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </div>
            </center>
        </div>
        <div style="clear: both">
        </div>
        <div>
            <uc1:footer runat="server" ID="footer"></uc1:footer>
        </div>
    </center>
    </form>
</body>
</html>
